unit Unit3;

{$mode ObjFPC}{$H+}

interface

uses
  Classes, SysUtils, Unit1, TypInfo;

procedure ShowRttiInfo;


implementation

procedure ShowRttiInfo;
var
  User: TUser;
  PropInfo: PPropInfo;
begin
    try
    User :=  TUser.Create('Jin',33);

    PropInfo := GetPropInfo(User.ClassInfo,'Name');
    if PropInfo <> nil then
    begin
       WriteLn(' Rtti Get User Name:',GetStrProp(User,'Name'));
    end;

    finally
      User.Free;
    end;

end;

end.

